<template>
  <div class="story-list">
    <el-descriptions
      v-for="item in story"
      :key="item.id"
      :title="item.title"
      class="list"
    >
      <el-descriptions-item label="描述:">{{
        item.content
      }}</el-descriptions-item>
      <el-descriptions-item label="创建时间:">{{
        item.createAt
      }}</el-descriptions-item>
    </el-descriptions>
  </div>
</template>

<script setup>
import { storyList } from "@/service/api/story";
import { ref } from "vue";

const story = ref([]);

const list = async () => {
  const { data } = await storyList();
  story.value = data.list;
};

list();
</script>

<style scoped lang="less">
.story-list {
  padding: 10px;
  .list {
    margin-bottom: 10px;
  }
}
</style>
